<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="联系记录" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<link href="/css/Query.css" rel="stylesheet" type="text/css">
<script src="/js/QueryList.js"></script>
<script src="/js/popup_ext.js"></script>
<script language="javascript">
	function doNew(){
		var url="/base/EstablishmentCommunicateNew.ihtm?client_id=${clientId}";
		ShowIframe("联系记录",url,980,440,"refreshWin(0)",900,600);
	}
	function refreshWin(flag){
		if(flag==1){
			if(popRetVal!=null){
				window.location.reload(true);
			}
		}else{
			window.location.reload(true);
		}
	}
	function showComm(id){
		var url="/base/EstablishmentCommunicateEdit.ihtm?id="+id;
		ShowIframe("联系记录",url,980,440,"refreshWin(1)",900,600);
	}
	function doDelete(id){
		ShowConfirm('确认框','确定删除吗？',340,80,"doDelAct("+id+")");
	}
	function doDelAct(id){
		if(popRetVal!=null){
			window.location="/base/EstablishmentCommunicateDelete.ihtm?id="+id+"&from_url="+getFromUrl();
		}
	}
	function getFromUrl(){
		return encodeURIComponent(window.location);
	}
	function doCancel(){
		window.close();
	}
	function doJump(pageIndex){
		if(window.event.keyCode==13){
			doGo(pageIndex);
		}
	}
	function doGo(pageIndex){
		window.location="/base/EstablishmentCommunicateList.ihtm?client_id=${clientId}&current_page="+pageIndex;
	}
	function doInit(){
		Window_Onload();
	}
	function DoubleClick(){
		
	}
</script>
</head>
<body oncontextmenu="return false" onload="doInit();" class="sheet" style="text-align:center;">
<div class="sheet-main" style="width:860px;text-align:left;margin:auto;">
  <div class="sheet-top">
    <div class="content">
      <h2>联系记录</h2>
      <p>客户名称：${est.estName}</p>
    </div>
  </div>
  <div class="sheet-list">
    <div class="search-business">
	    <div class="add_content"> 	
	    	 <div align="right"><input type="button" class="buttom search-add" value=" 新 增" onClick="doNew();"></div>
	     </div>
		 <%@include file="../inc/AlertMsg.jsp"%>
	     <div class="table-list">
	        <table width="100%">
				<tr>
					<th width="20%" >主题</th>
					<th width="15%" >日期</th>
					<th width="43%" >内容</th>
					<th width="10%" >执行人</th>
					<th width="12%" >操作</th>
				</tr>
				<c:forEach var="item" items="${qr.list}" varStatus="i">
				<c:if test="${(i.index mod 2)==0}"><c:set var="trClass" value="query_list_data_tr1" /></c:if>
				<c:if test="${(i.index mod 2)!=0}"><c:set var="trClass" value="query_list_data_tr2" /></c:if>
				<tr class="${trClass}" style="color:#000000" index="${i.index+1}" style='cursor:pointer;' ondblclick='javascript:DoubleClick(this)' onClick='javascript:ClickCheck(this)' onmouseout='javascript:mouseout(this)' onmouseover='javascript:mouseover(this)'>
					<td style="text-align:left;">
						${item.title}
						<input type="radio" name='query_checkbox' value="${item.id}" style="display:none">
					</td>
					<td><fmt:formatDate value="${item.communicateTime}" pattern="yyyy-MM-dd HH:mm"/></td>
					<td style="text-align:left;"><c:out value="${item.content}" /></td>
					<td>${item.createrName}</td>
					<td>
						<a href="javascript:showComm('${item.id}');">查看</a>
						<c:if test="${item.attachFile!=null && item.attachFile!=''}"><a href="${item.attachFile}" target="_blank"></c:if>查附件<c:if test="${item.attachFile!=null && item.attachFile!=''}"></a></c:if>
					</td>
				</tr>
				</c:forEach>
			</table>
			<%@include file="../inc/Pages.jsp"%>
			</div>
	   </div>  
  </div>
<div class="blank12"></blank>
</div>
</body>
</html>